package edu.calvin.djs32.cs214.interpreters.calculator.primitives;

import static org.junit.Assert.*;

import org.junit.Test;

import edu.calvin.cs214.hobbes2008.IntegerTIR;


public class AddPrimitiveTest {
	@Test
	public void shouldApplyAdd() {
	  assertEquals(new IntegerTIR(5), new AddPrimitive().apply(new IntegerTIR(2), new IntegerTIR(3)));
	  assertEquals(new IntegerTIR(6), new AddPrimitive().apply(new IntegerTIR(2), new IntegerTIR(4)));
	  assertEquals(new IntegerTIR(0), new AddPrimitive().apply(new IntegerTIR(-3), new IntegerTIR(3)));
	}
}
